home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2001 May / SGI Freeware 2001 May - Disc 1.iso / dist / fw_qt.idb / usr / freeware / include / qrtlcodec.h.z / qrtlcodec.h
C/C++ Source or Header  |  2001-04-12  |  2KB  |  61 lines

  1. /*
  2.  * Copyright (c) 1999 Lars Knoll <knoll@mpi-hd.mpg.de>, All rights reserved.
  3.  *
  4.  * Redistribution and use in source and binary forms, with or without
  5.  * modification, are permitted under the terms of the QPL, Version 1.0
  6.  *
  7.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  8.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  9.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  10.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  11.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  12.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  13.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  14.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  15.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  16.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  17.  * SUCH DAMAGE.
  18.  */
  19.  
  20. #ifndef QRTLCODEC_H
  21. #define QRTLCODEC_H
  22.  
  23. #ifndef QT_H
  24. #include "qtextcodec.h"
  25. #endif // QT_H
  26.  
  27. #ifndef QT_NO_CODECS
  28.  
  29. class Q_EXPORT QHebrewCodec : public QTextCodec {
  30. public:
  31.     virtual int mibEnum() const;
  32.     const char* name() const;
  33.  
  34.     QCString fromUnicode(const QString& uc, int& len_in_out) const;
  35.     QString toUnicode(const char* chars, int len) const;
  36.  
  37.     int heuristicContentMatch(const char* chars, int len) const;
  38.  
  39. protected:
  40.     virtual bool to8bit(const QChar ch, QCString *str) const; 
  41.     QString toUnicode(const char* chars, int len, const ushort *table) const;
  42.  
  43. };
  44.  
  45. class Q_EXPORT QArabicCodec : public QHebrewCodec {
  46. public:
  47.     virtual int mibEnum() const;
  48.     const char* name() const;
  49.  
  50.     QString toUnicode(const char* chars, int len) const;
  51.  
  52.     int heuristicContentMatch(const char* chars, int len) const;
  53.  
  54. protected:
  55.     virtual bool to8bit(const QChar ch, QCString *str) const; 
  56. };
  57.  
  58. #endif
  59.  
  60. #endif
  61.